﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication1.BusinessController
{
    public class OutstandingRequisitionManager
    {
        public OutstandingRequisitionManager() { }
        public OutstandingRequisitionManager(string id)
        {
            reqID = id;
        }
        public OutstandingRequisitionManager(string id,DateTime id2,DateTime id3)
        {
            reqID = id;
            date_from = id2;
            date_to = id3;
        }
        public static string reqID
        { get; set; }
        public static DateTime date_from
        { get; set; }
        public static DateTime date_to
        { get; set; }
        public static IQueryable getAllOutstandingRequisition()
        {
           DBBroker.OutstandingRequisition manager = new DBBroker.OutstandingRequisition(reqID);
            var olist = DBBroker.OutstandingRequisition.getOutstandingList();
            return olist;
        }
        public static IQueryable getAllOutstandingDetailRequisition()
        {
           DBBroker.OutstandingRequisition manager = new DBBroker.OutstandingRequisition(reqID);
            var olist = DBBroker.OutstandingRequisition.getOutstandingDetailList();
            return olist;
        }
        public static IQueryable getDistributionList()
        {
            DBBroker.OutstandingRequisition manager = new DBBroker.OutstandingRequisition(reqID);
            var olist = DBBroker.OutstandingRequisition.getDistributionList();
            return olist;
        }
        public static IQueryable getDistributionByPeriodList()
        {
            DBBroker.OutstandingRequisition manager = new DBBroker.OutstandingRequisition(reqID,date_from,date_to);
            var olist = DBBroker.OutstandingRequisition.getDistributionByPeriodList();
            return olist;
        }
        public static IQueryable getAllDistributionDetailRequisition()
        {
             DBBroker.OutstandingRequisition manager = new DBBroker.OutstandingRequisition(reqID);
            var olist = DBBroker.OutstandingRequisition.getDistributionDetailList();
            return olist;
        }
    }
}